<template>
	<!-- <view class="news-wrap" :class="skinStyle"> -->
		<!-- <view v-if="list.length>0" class="news-item" v-for="(item,index) in list" :key="index">
			<i></i>
			<view class="title">{{item.content.news_item[0].title}}</view>
			<text class="view-btn" @tap="viewDetail(item.content.news_item[0])">查看更多</text>
		</view>
		<mix-empty v-else :type="'default'" :backgroundColor="'#fff'"></mix-empty>
		<loading></loading>
		<tui-modal></tui-modal> -->
	<!-- </view> -->
	<view class="development">
		<image src="https://dr-static-cdn.newlifegroup.com.cn/newdrmall/static/development.jpg" mode="widthFix"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				selectedIndex: 0,
				list: [],
				upOption: {
					auto: false, // 是否自动加载
					page: {
						size: 10 // 每页数据的数量,默认10
					},
					noMoreSize: 4, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
					textNoMore: '-- 无更多信息 --',
				},
			}
		},
		onLoad(options) {
			// #ifdef H5
			   this.$wechat.noShare();
			// #endif
			// this.loadList()
		},
		methods: {
			loadList(page) {
				this.$http.getCompanyNews().then((res) => {
					if (res.status === 0) {
						if (res.data) {
							this.list = res.data.item;
						}
					}
				})
			},
			viewDetail(item) {
				let obj={
					author:item.author,
					title:item.title,
					content:item.content.replace(/(<a.*?>)/g, '<span>').replace(/(<\/\s?a)>/g,'</span>'),
				}
		
				uni.navigateTo({
					url:'./newsDetail?item='+encodeURIComponent(JSON.stringify(obj))
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.development {
		image {
			width: 100%;
		}
	}
	.news-wrap{
		width: 100%;
		min-height: 100vh;
		background-color: #fff;
		padding:0 20rpx;
		box-sizing: border-box;
		border-top:2rpx solid $borderColor;
		.news-item{
			width:100%;
			display: flex;
			align-items:center;
			border-bottom: 1rpx dashed #ccc;
			padding:40rpx 10rpx;
			i{
				display: inline-block;
				background-color: $themeColor1;
				width:10rpx;
				height:10rpx;
				border-radius: 50%;
				margin-right: 10rpx;
			};
			.title{
				flex:1;
				text-overflow: ellipsis;
				white-space: nowrap;
				overflow: hidden;
			}
			.view-btn{
				width:130rpx;
				text-align: center;
				color:#aaa;
				font-size: 26rpx;
			}
		}
	}
</style>
